home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / basic / qbnws105.zip / DAZZLING.ZIP / DAZZDEMO.BAS < prev    next >
BASIC Source File  |  1990-11-27  |  18KB  |  446 lines

  1. '           +===================================================+
  2. '           |                   DAZZDEMO.BAS                    |
  3. '           |             Written and Developed by:             |
  4. '           |                  Lawrence Stone                   |
  5. '           |                  November, 1990                   |
  6. '           +---------------------------------------------------+
  7. '           |    Purpose:  Demonstrate the various window       |
  8. '           |              routines in the DAZZLING module.     |
  9. '           +---------------------------------------------------+
  10. '           |  Compile:  bc dazzling /o;                        |
  11. '           |  Compile:  bc dazzdemo /x/o;                      |
  12. '           |  Link:  link /e dazzdemo+dazzling,dazzling,nul;   |
  13. '           +---------------------------------------------------+
  14. '
  15. '           +===================================================+
  16. '           |                   Declarations                    |
  17. '           +---------------------------------------------------+
  18.  
  19. ' $INCLUDE: 'DAZZLING.BI'
  20.  
  21.  
  22. '           +===================================================+
  23. '           |                Initialization Code                |
  24. '           +---------------------------------------------------+
  25.  
  26.     MaxLine = 50                'Designate the number of screen rows.
  27.     ON ERROR GOTO ScreenErr     'Trap it if it is wrong.
  28.         WIDTH , MaxLine         'Set the number of screen rows.
  29.     ON ERROR GOTO 0
  30.     LOCATE , , 0                'Turn off cursor.
  31.     ScrnEls = MaxLine * 80      'Determine array sizes for the monitor.
  32.  
  33.     REM $DYNAMIC                'Use a data area outside of BASIC.
  34.     DIM Wind(ScrnEls)           'Integer array (2000, 3440, or 4000 Elements)
  35.     DIM Wind2(ScrnEls)          'Integer array (2000, 3440, or 4000 Elements)
  36.     DIM ClrScreen(ScrnEls)      'Integer array (2000, 3440, or 4000 Elements)
  37.     REM $STATIC                 'Back to BASIC's data area.
  38.  
  39.     GetMonitorSeg               'Get the address for the video map.
  40.  
  41.     FOR N = 0 TO ScrnEls        'Create a 'Black Screen' array
  42.         ClrScreen(N) = &H700    'for dazzling screen clearing.
  43.     NEXT
  44.  
  45.     IF MaxLine > 25 THEN LeadingRows = 10 ELSE LeadingRows = 0
  46.  
  47. '           +===================================================+
  48. '           |             Demonstration of DAZZLING             |
  49. '           +---------------------------------------------------+
  50.  
  51.     ReadBinFile Wind(), "CRESCENT.BIN", LeadingRows
  52.     IF MaxLine > 25 THEN GOSUB ExpandCrescentPic
  53.     
  54.     Curtains 0, Wind()          'Display Crescent Screen with opening curtains
  55.     TickPause 18                'One second pause.
  56.  
  57.     COLOR 11, 1: LOCATE LeadingRows + 11, 27
  58.     PRINT "Get prepared for LSRGroup's"
  59.     LOCATE , 27: PRINT "DAZZLING set of QB screen"
  60.     LOCATE , 27: PRINT "routines."
  61.     PRINT : PRINT : COLOR 0, 7
  62.     LOCATE , 27: PRINT " Press Any Key to Continue. "
  63.  
  64.     ReadBinFile Wind2(), "SHUTTLE.BIN", LeadingRows
  65.     IF MaxLine > 25 THEN GOSUB ExpandShuttlePic
  66.  
  67.     Z$ = INPUT$(1)              'Wait for a key stroke.
  68.     COLOR 15, 0
  69.     
  70.     Curtains 1, Wind2()         'Display the Shuttle with closing curtains
  71.  
  72.     LOCATE MaxLine, 16
  73.     PRINT " Press A Key When Ready for a DAZZLING Blast Off! ";
  74.     Z$ = INPUT$(1)              'Wait for a key stroke.
  75.  
  76.     Curtains 1, Wind2()         'Produce next picture with closing curtains.
  77.  
  78.     GOSUB MakeConstantNoise     'Make continuous tone using internal timer.
  79.  
  80.     Shake 25                    'Shake the screen for about 2.5 seconds
  81.  
  82.     GOSUB QuietPlease           'Turn off the continuous tone.
  83.  
  84.     TickPause 21
  85.     
  86.     Implode ClrScreen()
  87.     TickPause 21
  88.     
  89.     Mess$ = "   Dazzling Stair Steps"
  90.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 15, 1
  91.     Dazzle 1, 1, Wind()          'Dazzled Stair Steps Left - Right
  92.     TickPause 36
  93.  
  94.     Dazzle 1, 2, Wind2()         'Dazzled Stair Steps Right - Left
  95.     TickPause 9
  96.  
  97.     Mess$ = " Dazzling Diagonal Blocks"
  98.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 12, 1
  99.     Dazzle 5, 1, Wind()          'Diagonally Dazzled from SW to NE
  100.     TickPause 36
  101.  
  102.     Dazzle 5, 2, Wind2()         'Diagonally Dazzled from NE to SW
  103.     TickPause 9
  104.  
  105.     Dazzle 1, 1, ClrScreen()     'Clear the screen with dazzle!
  106.     TickPause 21
  107.  
  108.     Mess$ = "  Eight Shimmering Blinds  "
  109.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 10, 1
  110.     Dazzle 2, 2, Wind()          'Dazzled with -8- Vertical Blinds
  111.     TickPause 36
  112.     Dazzle 2, 1, Wind2()         'Dazzled with -8- Vertical Blinds
  113.     TickPause 21
  114.  
  115.     Dazzle 2, 2, Wind()          'Dazzled with -8- Vertical Blinds
  116.     TickPause 9
  117.  
  118.     Dazzle 2, 1, ClrScreen()     'Clear the screen with dazzle!
  119.     TickPause 21
  120.  
  121.     Dazzle 4, 1, Wind2()         'Dazzle: Long Slots Left to Right
  122.     TickPause 21
  123.  
  124.     Mess$ = " Absolutely Dazzling Slots"
  125.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 11, 1
  126.     Dazzle 4, 2, Wind()          'Dazzle: Long Slots Right to Left
  127.     TickPause 36
  128.  
  129.     Dazzle 4, 1, ClrScreen()     'Clear the screen with dazzle!
  130.     TickPause 9
  131.  
  132.     Dazzle 8, 2, Wind2()         'Dazzled up with Venetian Blinds
  133.     TickPause 9
  134.  
  135.     Mess$ = " Dazzling Venetian Blinds "
  136.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 1, 3
  137.     Dazzle 8, 1, Wind()          'Dazzled down by: Venetian Blinds
  138.     TickPause 36
  139.     
  140.     Dazzle 8, 2, ClrScreen()     'Clear the screen with dazzle!
  141.     TickPause 9
  142.  
  143.     Dazzle 3, 1, Wind2()         'Dazzled with -4- Vertical Blinds
  144.     TickPause 9
  145.  
  146.     Mess$ = "    Four Vertical Blinds   "
  147.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 14, 1
  148.     Dazzle 3, 2, Wind()          'Dazzled with -4- Vertical Blinds
  149.     TickPause 36
  150.  
  151.     Dazzle 3, 1, ClrScreen()     'Clear the screen with dazzle!
  152.     TickPause 9
  153.  
  154.     Dazzle 0, 0, Wind2()         'Pull down screen
  155.     TickPause 5
  156.  
  157.     Mess$ = "Pull 'em down - pull 'em up"
  158.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 15, 1
  159.     Dazzle 0, 1, Wind()          'Pull up screen
  160.     TickPause 36
  161.     
  162.     Dazzle 0, 0, Wind2()         'Pull down screen
  163.     TickPause 9
  164.  
  165.     Mess$ = "Side slides right then left"
  166.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 13, 1
  167.     Dazzle 6, 1, Wind()          'Dazzle Side Slide: Left to Right
  168.     TickPause 36
  169.     
  170.     Dazzle 6, 2, Wind2()         'Dazzle Side Slide: Right to Left
  171.     TickPause 9
  172.  
  173.     Dazzle 6, 1, ClrScreen()     'Clear the screen with dazzle!
  174.     TickPause 9
  175.  
  176.     Mess$ = "     Imploding Screen      "
  177.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 15, 1
  178.     Implode Wind()
  179.     TickPause 21
  180.  
  181.     Implode Wind2()
  182.     TickPause 21
  183.  
  184.     Mess$ = "   Imploding Screen !!!!   "
  185.     StuffMess Wind(), Mess$, LeadingRows + 13, 28, 15, 1
  186.     Implode Wind()
  187.     Implode Wind2()
  188.  
  189.     Mess$ = "Imploding Screen Again !!!!"
  190.     StuffMess Wind(), Mess$, LeadingRows + 14, 28, 15, 1
  191.     Implode Wind()
  192.     Implode ClrScreen()
  193.  
  194.     Mess$ = SPACE$(28)           'Let's clear the little computer's screen.
  195.     StuffMess Wind(), Mess$, LeadingRows + 13, 28, 15, 1
  196.     StuffMess Wind(), Mess$, LeadingRows + 14, 28, 15, 1
  197.  
  198.     Dazzle 7, 2, Wind2()         'Rolling Grates  -  Right to Left
  199.     TickPause 9
  200.  
  201.     Mess$ = "Rolling Grates - I Like It!"
  202.     StuffMess Wind(), Mess$, LeadingRows + 12, 28, 15, 1
  203.     Dazzle 7, 1, Wind()          'Rolling Grates  -  Left to Right
  204.     TickPause 36
  205.     
  206.     Dazzle 7, 2, ClrScreen()     'Clear the screen with dazzle!
  207.     TickPause 9
  208.  
  209.     Dazzle 0, 0, Wind2()         'Pull down screen
  210.     TickPause 21
  211.     
  212.     Mess$ = "┌─────────┐"
  213.     StuffMess Wind2(), Mess$, LeadingRows + 7, 35, 14, 0
  214.     Mess$ = "┴─────────┴"
  215.     StuffMess Wind2(), Mess$, LeadingRows + 17, 35, 14, 0
  216.     Mess$ = "█▓▓▒░         ░▒▓▓█"
  217.     StuffMess Wind2(), Mess$, LeadingRows + 8, 31, 14, 0
  218.     StuffMess Wind2(), Mess$, LeadingRows + 9, 31, 14, 0
  219.     Mess$ = "█▓▓▒░ MISSION ░▒▓▓█"
  220.     StuffMess Wind2(), Mess$, LeadingRows + 10, 31, 14, 0
  221.     Mess$ = "█▓▓▒░ SUCCESS ░▒▓▓█"
  222.